<!doctype html>
<html ng-app>
<head>
    <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js"></script>
</head>
<body>
<div ng-controller='DeathrayMenuController'>
    <button ng-click='toggleMenu()'>Toggle Menu</button>
    <ul ng-show='menuState.show'>
        <li ng-click='stun()'>Stun</li>
        <li ng-click='disintegrate()'>Disintegrate</li>
        <li ng-click='erase()'>Erase from history</li>
    </ul>
</div>
<script>
    function DeathrayMenuController($scope) {
        $scope.menuState = { show: false };

        $scope.toggleMenu = function () {
            $scope.menuState.show = !$scope.menuState.show;
        };

        // death ray functions left as exercise to reader
    }
</script>
</body>
</html>
